#include "QRCodeDetection.h"

void identifyQR ()
{

}

void prominentUniformity (std::vector<Object*>& objs)
{
    std::vector<int> validSizes;
    std::vector<Object*> validObjects;
    unsigned int t;

    for(std::vector<Object*>::iterator it = objs.begin(); it!=objs.end(); it++)
    {
        t = (*it)->getCount();
        if(t > MIN_PX_PER_BLOCK and t < MAX_PX_PER_BLOCK)
        {
            validSizes.push_back(t);
            validObjects.push_back(*it);
        }
    }

    int nearby[validSizes.size()];
    int nearbyMax=0;// Object* objMax;

    for(t=0;t<validSizes.size();t++)
    {
        nearby[t] = 0;
        for(std::vector<int>::iterator it2 = validSizes.begin(); it2!=validSizes.end(); it2++)
        {
            if (abs(validSizes[t] - *it2) < DELTA_SIZE_TOLERANCE) nearby[t]++;
        }
        if(nearby[t] > nearbyMax) {nearbyMax = nearby[t]; /*objMax = validObjects[t];*/}
    }

}
